-get_span(ratio = 1)
  return ratio * 100

-get_column(ratios = 1, g = jeet.gutter)
  ratios = -reverse(ratios) unless jeet.parent-first is true
  w = 100
  for ratio in ratios
    g = g / w * 100
    w = 100 * ratio - g + ratio * g
  return w g

-get_layout_direction()
  jeet.layout-direction == RTL ? result = right : result = left
  return result

-replace_nth(list, index, value)
  result = ()
  index = length(list) + index if index < 0
  for i in (0..(length(list) - 1))
    if i == index
      append(result, value)
    else
      append(result, list[i])
  return result

-reverse(list)
  result = ()
  for item in list
    prepend(result, item)
  return result
